package javass;

import java.sql.SQLException;



public class Test {
	public static void main(String[] args) throws ClassNotFoundException, SQLException {
		Fangfa f=new Fangfa();
		//System.out.println(f.update1("555", "honghong", "123456"));
		Userinfo ui=new Userinfo();
		ui.setUsername("honghong");
		ui.setPassword("123456");
		System.out.println(f.login(ui));
		//Userinfo ui=new Userinfo();
		
	/*	ConnectionUtil connutil=new ConnectionUtil();
		Connection conn=connutil.getConn();
		PreparedStatementUtil psu=new PreparedStatementUtil();
		
		String sql="UPDATE userinfo u SET u.`password`=? WHERE u.username=? AND u.`password`=?;";
		PreparedStatement ps=psu.getPreparedStatement(conn, sql);
		ps.setString(1,"123456sc");
		ps.setString(2,"sunchang");
		ps.setString(3,"12345");
		ps.executeUpdate();
		conn.close();
		ps.close();*/
		//rs.close();//有返回值时，比如select时才有结果集，才需要关闭

		/*Userinfo ui=new Userinfo();
		ui.setUsername("dsfsfsfds");
		ui.setPassword("123456");
		Fangfa f=new Fangfa();
		System.out.println(f.login(ui));*/
	}
}
